﻿@model OneWeb.ViewModels.AnswerListPageViewModel
@using PagedList.Mvc

@{
    ViewBag.Title = "问答";
    Layout = "~/Views/Shared/_Layout.cshtml";
}


<div class="row-fluid container">
    <ul class="list-group">
        @foreach (var item in Model.Answers)
        {
            <li class="list-group-item photo-big">
                <div class="one-image">
                    <a href="@Url.Action("details", "answer",new { Id = item.Id })" target="_blank">
                        @*<img class="photo-pic avatar" src="@item.Author.WebUrl" alt="@item.Title 作者/@item.Author.Name">*@
                        @*<img src="@item.ImageUrl" />*@
                    </a>
                    <a href="@Url.Action("details", "answer",new { Id = item.Id })" target="_blank" title="@item.AskerName : @item.QuestionTitle"></a>
                </div>

                <a href="@Url.Action("details", "answer",new { Id = item.Id })" style="text-decoration:none" target="_blank">
                    <h4>@item.AskerName : @item.QuestionTitle</h4>
                </a>
                 
                <p>@item.AnswerSummary ...</p>                                                                                                                                                                                      
            </li>
        }
    </ul>
</div>
@Html.PagedListPager(Model.Answers, page => Url.Action("Index",
    new { page, sortOrder = ViewBag.CurrentSort, currentFilter = ViewBag.CurrentFilter }))
Page @(Model.Answers.PageCount < Model.Answers.PageNumber ? 0 : Model.Answers.PageNumber) of @Model.Answers.PageCount
 